#pragma once
#include <BWAPI.h>
using namespace BWAPI;

class Vector
{
  public:
    Vector(double x,double y); // Create a vector with the given x and y components
    Vector(Position* pos); // Create a vector representing the given Position relative to the origin
    Vector operator+(const Vector& other) const; // Add two vectors
    Vector operator-(const Vector& other) const; // Subtract the given vector from this one
    bool operator==(const Vector& other) const; // Check if the two vectors are equal
    void scale(double scalar); // Multiply the magnitude of the vector by the given scalar
    void normalize(); // Sets the length of this vector to 1 without changing its direction
    double lengthSq(); // Returns the squared length of this vector
    double length(); // Returns the length of this vector
    double x;
    double y;
};
